<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>       
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/ts-demo.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/leftList.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/xqtz.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/page.css" type="text/css">
<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" source="widget" />
<script type="text/javascript">
    var ctx = '${ctx}';
</script>

<style>
a {
cursor: pointer;
}
.form {
padding-top:40px;

}
.form table {
    margin: 10px auto;
    border-collapse: collapse;
    border-color:#B5B5B5;
}

.table-f th{
    background:#57B4C6;
    height:45px;
    color:#fff;
    font-size:14px;
    text-align:center;
}

.table-f td{
    color:#7B7B7B;
    font-size:14px;
    height:79px;
    text-align:center;
    
}
.pspace{
text-indent:137px;
}
</style>


</head>

<body>
    <jsp:include page="/views/common/head_main.jsp" />
    <div class="bg">
    <input type="hidden" id="item" value="${sessionScope.item_property}"/>
        <div class="contentbox contentbox1">
            <div class="padd1">
            <!--左导航 -->
                <div class="left-list">
                    <ul>
                       <li class="all"><a href=""><img class="font-icon" src="${ctx}/images/xqtz/xq7.png" />全部<span class="fuhao fh-color">∨</span></a></li>
                        <c:if test="${displayFeeBill == 1}">
                        <li class="sub-list"><a href="${ctx}/propertyBill/getMyBill"><img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />物业费<span class="fuhao">＞</span></a></li>
                        </c:if>
                        <c:if test="${displayCar == 1}">
                        <li class="sub-list"><a href="${ctx}/carBill/getCarManage"><img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />停车费<span class="fuhao">＞</span></a></li>
                        </c:if>
                        <%-- <li class="sub-list"><a href="javascript:void(0)"><img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />水电费<span class="fuhao">＞</span></a></li> --%>  
                        <li class="sub-list"><a href="${ctx}/propertyRepair/goToEditPage"><img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />物业报修<span class="fuhao">＞</span></a></li>  
                        <li class="sub-list"><a href="${ctx}/propertySuggestion/goToEditPage"><img class="font-icon" src="${ctx}/images/xqtz/xq8.png" />物业投诉<span class="fuhao">＞</span></a></li>  
                    </ul>
                </div>
                <!-- 右边编辑栏 -->
                <div class="rightbox">
            <img src="${ctx}/images/tsjy/ts1.png">
             <div id="first" style="background:#d6eaf1;">
            <div class="nav-list" style="width:921px;">  
                <ul>
                    <li style="width:460px;"><img style=" height: 20px;vertical-align: -4px;"src="${ctx }/images/wuye/wy3.png"/><a href="${ctx}/propertySuggestion/goToEditPage" style="color:black">提交投诉</a><div class="bottom-box "></div></li>
                    <li style="width:460px;"><img style=" height: 20px;vertical-align: -4px;" src="${ctx}/images/wuye/tousuqipao.png"/>我的投诉<div id="show-box" class="bottom-box "></div></li>
                </ul>
            </div>
            
           
                <div class="content" >
               
                
               <c:forEach items="${complaintsInfos.list }" var="item" varStatus="itemStatus">
               
               <div id="copmlainCategory" class="form">
               <p class="pspace"><fmt:formatDate value="${item.createTime}"
                                                pattern="yyyy-MM-dd   HH:mm" /></p>
                        <table border="1"class="table-f">
                            <thead>
                                <tr class="">
                                    <th class="">标题</th>
                                    <th class="">类型</th>
                                    <th class="">内容</th>
                                    <th class="">状态</th>
                                </tr>
                            </thead>
                            <tbody>
                            
                            <tr class="text-c">
                                <td width="230px;">${item.title}</td>
                                <td width="93px;">
                                    <c:if test="${item.sugesstionType == 0}">向物业投诉</c:if>
                                    <c:if test="${item.sugesstionType == 1}">向物业建议</c:if>
                                </td>
                                <td width="193px;">${item.content}</td>
                                <td width="130px;">
                                    <p><c:if test="${item.state == 0}">未回复</c:if>
                                    <c:if test="${item.state == 1}">已回复</c:if>
                                    <c:if test="${item.state == 2}">已评价</c:if></p>
                                    <p><a onclick="gotoShowDetails('${item.id}');" style="color:red;cursor: pointer;">(查看详情)</a></p>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    
                </div> 
                
                </c:forEach>
                 <div class="page">
                 <input id="pages" type="hidden" value="${complaintsInfos.pages}">
                        <ul>
                            <li><a class="last-page page-change "
                                onclick="gotoPage(${currentPage-1 });">&lt;上一页</a></li>
                            <c:if test="${complaintsInfos.firstPage > 1}">
                                <li onclick="gotoPage(1);" class="page-num"><a>1</a></li>
                                <c:if test="${complaintsInfos.firstPage > 2}">
                                    ...
                                    </c:if>
                            </c:if>
                            <c:forEach items="${complaintsInfos.navigatepageNums }" var="page">
                                <li onclick="gotoPage(${page});"
                                    class="<c:if test="${currentPage == page }">current</c:if>"
                                    class="page-num"><a>${page}</a></li>
                            </c:forEach>
                            <c:if test="${complaintsInfos.lastPage < complaintsInfos.pages}">
                                <c:if
                                    test="${complaintsInfos.firstPage < complaintsInfos.pages - 1}">
                                    ...
                                    </c:if>
                                <li onclick="gotoPage(${complaintsInfos.pages});"
                                    class="page-num"><a>${complaintsInfos.pages}</a></li>
                            </c:if>
                            <li><a class="next-page page-change"
                                onclick="gotoPage(${currentPage+1 });">下一页&gt;</a></li>
                        </ul>
                    </div>
               
            </div>
           
                    </div>
                </div>  
                </div>
        </div>
   </div>                 
<jsp:include page="/views/common/footer.jsp" />
<script src="${ctx}/js/controllers/property/propertySuggestion/PropertySuggestionDetailsController.js" type="text/javascript"></script>
<script type="text/javascript">
var ctx = '${ctx}';
setCtx(ctx);

//跳转到列表页面
function gotoPage(page) {
	var pages = $("#pages").val();
	if(page == null || page == 'undefined'){
		page = this.page;
	}
	if(page < 1 ){
		layer.msg("已到达第一页!", {
			time : 2000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else if(page > pages && pages > 0){
		layer.msg("已到达最后一页!", {
			time : 1000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else {
		window.location.href= ctx + "/propertySuggestion/infoList?pNo=" + page;  
	}
}

function gotoShowDetails(id){
	$('#first').load(ctx+"/propertySuggestion/showDetails?id="+id);
}
</script> 
<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script> 
</body>
</html>